
import re

s = "<topic %s>"%'学习'
print(s)
s = "http://127.0.0.1/user/200/"
mat = re.search(r'/user/(?P<u_id>)\d+/$',s)

print('mat',mat)
print('mat',mat.group(0))
print('mat',mat.span())
print('mat',mat.groups())